<?php
/**
 * Created by PhpStorm.
 * User: zhangrxiang
 * Date: 2017/1/8
 * Time: 18:00
 * File: function.array-keys.php
 * Project: PHPTEST
 * Location: Wuxi
 */

//array_keys — 返回数组中部分的或所有的键名
//array array_keys ( array $array [, mixed $search_value [, bool $strict = false ]] )

$array = array(0 => 100, "color" => "red");
print_r(array_keys($array));

$array = array("blue", "red", "green", "blue", "blue");
print_r(array_keys($array, "blue"));

$array = array("color" => array("blue", "red", "green"),
    "size"  => array("small", "medium", "large"));
print_r(array_keys($array));